home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
7_10.lha
/
7_10
/
po_error.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
541b
|
30 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
include <process.h>
include <debug.h> /* DELETE */
/ print an error message and exit
/ or invoke the user-defined error function
oid process_object::error(char *s)
static int in_error_fct = 0;
// recursive errors aren't allowed
if (in_error_fct)
::exit(1);
in_error_fct = 1;
if (po_error_fct)
(*po_error_fct)(s);
else
{
cerr << s << "\n";
::exit(1);
}
in_error_fct = 0;